-- GENERATED SPELL FOR [Warlord Kalithresh] --


function spell0_17798(pUnit, Event) --@Head Crack,n/a--
pUnit:FullCastSpellOnTarget(16172,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17798', 20381, 1)
end

function spell1_17798(pUnit, Event) --@Spell Reflection,Self--
pUnit:FullCastSpellOnTarget(31534,pUnit)
pUnit:RegisterEvent('Sorts_17798', 8374, 1)
end

function spell2_17798(pUnit, Event) --@Warlord\'s Rage,n/a--
pUnit:FullCastSpellOnTarget(37081,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17798', 12000, 1)
end

function Sorts_17798(pUnit, Event)
local choix_sorts_17798 = math.random(0, 2)
if choix_sorts_17798 == 0 then
pUnit:RegisterEvent('spell0_17798', 1, 1)
end
if choix_sorts_17798 == 1 then
pUnit:RegisterEvent('spell1_17798', 1, 1)
end
if choix_sorts_17798 == 2 then
pUnit:RegisterEvent('spell2_17798', 1, 1)
end
end

function mob17798_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17798', math.random(1500, 3000), 1)
end

function mob17798_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17798_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17798_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17798, 1, 'mob17798_Action')
RegisterUnitEvent(17798, 2, 'mob17798_Leave')
RegisterUnitEvent(17798, 3, 'mob17798_Kill')
RegisterUnitEvent(17798, 4, 'mob17798_Die')
